<template>
  <div class="footer">
    <h1>我是Footer</h1>
    <p>Count的值是{{ count }}</p>
    <h2>电影列表 <button @click="getMovieList">获取</button></h2>
    <ul>
      <li v-for="item in movieList" :key="item.tvId">{{ item.albumName }}</li>
    </ul>
  </div>
</template>

<script>
import { mapState, mapActions } from "vuex";
export default {
  name: "Footer",
  computed: {
    ...mapState("count", ["count", "movieList"]),
  },
  methods: {
    ...mapActions("count", ["getMovieList"]),
    /*  getMovieList() {
      this.$store.dispatch("getMovieList");
    }, */
  },
};
</script>

<style scoped>
.footer {
  margin: 30px;
  background: palevioletred;
}
</style>